<template>
  <view class="margin-top padding-lr">
    <view class="text-black text-bold">热门搜索</view>
    <view class="padding-tb flex">
      <block v-for="(item,index) in hotList" :key="index">
        <view class="padding-lr-xs" :data-index="index" @tap="clickHot">
          <view class="cu-tag round bg-orange light">{{ item }}</view>
        </view>
      </block>
    </view>
  </view>
</template>

<script setup lang="ts">
import {defineEmits, defineProps, ref} from "vue";

const props =defineProps({
  hotList:{
    type:Array,
    default:[],
  }
})

const emits =defineEmits(['clickHot'])

const clickHot = (e: any) => {
  emits('clickHot',props.hotList.at(e.currentTarget.dataset.index))
}
</script>

<style scoped>

</style>